import 'package:yurun_smartmerchants/models/upload_image_response_entity.dart';

uploadImageResponseEntityFromJson(UploadImageResponseEntity data, Map<String, dynamic> json) {
	if (json['content'] != null) {
		data.content = new List<UploadImageResponseContent>();
		(json['content'] as List).forEach((v) {
			data.content.add(new UploadImageResponseContent().fromJson(v));
		});
	}
	return data;
}

Map<String, dynamic> uploadImageResponseEntityToJson(UploadImageResponseEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	if (entity.content != null) {
		data['content'] =  entity.content.map((v) => v.toJson()).toList();
	}
	return data;
}

uploadImageResponseContentFromJson(UploadImageResponseContent data, Map<String, dynamic> json) {
	if (json['ext'] != null) {
		data.ext = json['ext']?.toString();
	}
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['path'] != null) {
		data.path = json['path']?.toString();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['secret'] != null) {
		data.secret = json['secret'];
	}
	return data;
}

Map<String, dynamic> uploadImageResponseContentToJson(UploadImageResponseContent entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['ext'] = entity.ext;
	data['modifiedTime'] = entity.modifiedTime;
	data['path'] = entity.path;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['name'] = entity.name;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['secret'] = entity.secret;
	return data;
}